<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>function_Demo</title>
    <script >
        function myFunction(){
            alert("Hello world!");
        }
        function myFunction_1(name,job){
            alert("welcome " +name+",the"+job)
        }
        function myFunction_2(a,b){
            return a*b;
        }
        document.getElementById("mul").innerHTML = myFunction_2(4,3);
        function myFunction_3(a,b){
            if(a>b)
            {
                return;     // 退出当前函数
            }
            x = a+b
        }
        document.getElementById("mul_1)").innerHTML = myFunction_3(3,5);

        var carName = "Volvo"

        function myFuction_5(){
            //  函数内可以调用cerName
            console.log(cername)
        }
        var answer  = 'it is a dog';
        var answer = "it is a dog";
    </script>
</head>
<body>
       <button onclick="myFunction()">click</button>
        <p>点击按钮，调用参数</p>
        <button onclick="myFunction_1('harry','pc')">点击这里</button>
        <p id="mul"></p>
        <p id="mul_1"></p>

</body>
</html>